//
//  Combination_Header_TableViewCell.swift
//  Pods
//
//  Created by eme on 2017/4/5.
//
//

import UIKit
import RickonCore
import BrandonCore

class Combination_Header_TableViewCell: UITableViewCell {
    
    @IBOutlet weak var header_ImageView: UIImageView!
    
    @IBOutlet weak var heder_NameLabel: UILabel!
    
    @IBOutlet weak var header_Status: UILabel!
    
    @IBOutlet weak var price_Label: UILabel!
    
    @IBOutlet weak var number_Label: UILabel!
    
    @IBOutlet weak var lineView: UIView!
    
    var item:GroupModel?{
        didSet{
            if let model = item{
                self.header_ImageView.setUrlImage(model.img1)
                self.heder_NameLabel.text = model.pdname
                self.header_Status.text = ["","组合商品","买赠商品"][Int(model.pdtype) ?? 0]
                self.number_Label.text = "\(model.moq)件起批"
                if case AppDataState.audited = AppData.appState{
                    self.price_Label.text = model.shprice.getPriceStr()
                }else{
                    self.price_Label.text = "￥***"
                }
//                self.price_Label.text = model.shprice.getPriceStr()
            }
            
        }
    }

    override func awakeFromNib() {
        super.awakeFromNib()
        self.lineView.backgroundColor = Theme.v.separate_Line
        self.heder_NameLabel.normal_fontSize(14)
        self.header_Status.normal_fontSize(13)
        self.number_Label.normal_fontSize(13)
        self.price_Label.normal_fontSize(16)
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }

}
